\(\int \frac {x^2}{\sqrt {a x^2+b x^3}} \, dx\) [254]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 49 \[ \int \frac {x^2}{\sqrt {a x^2+b x^3}} \, dx=\frac {2 \sqrt {a x^2+b x^3}}{3 b}-\frac {4 a \sqrt {a x^2+b x^3}}{3 b^2 x} \]

[Out]

2/3*(b*x^3+a*x^2)^(1/2)/b-4/3*a*(b*x^3+a*x^2)^(1/2)/b^2/x

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2041, 1602} \[ \int \frac {x^2}{\sqrt {a x^2+b x^3}} \, dx=\frac {2 \sqrt {a x^2+b x^3}}{3 b}-\frac {4 a \sqrt {a x^2+b x^3}}{3 b^2 x} \]

[In]

Int[x^2/Sqrt[a*x^2 + b*x^3],x]

[Out]

(2*Sqrt[a*x^2 + b*x^3])/(3*b) - (4*a*Sqrt[a*x^2 + b*x^3])/(3*b^2*x)

Rule 1602

Int[(Pp_)*(Qq_)^(m_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[Coeff[Pp, x, p]*x^(p - q +
 1)*(Qq^(m + 1)/((p + m*q + 1)*Coeff[Qq, x, q])), x] /; NeQ[p + m*q + 1, 0] && EqQ[(p + m*q + 1)*Coeff[Qq, x,
q]*Pp, Coeff[Pp, x, p]*x^(p - q)*((p - q + 1)*Qq + (m + 1)*x*D[Qq, x])]] /; FreeQ[m, x] && PolyQ[Pp, x] && Pol
yQ[Qq, x] && NeQ[m, -1]

Rule 2041

Int[((c_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol] :> Simp[c^(j - 1)*(c*x)^(m - j +
1)*((a*x^j + b*x^n)^(p + 1)/(a*(m + j*p + 1))), x] - Dist[b*((m + n*p + n - j + 1)/(a*c^(n - j)*(m + j*p + 1))
), Int[(c*x)^(m + n - j)*(a*x^j + b*x^n)^p, x], x] /; FreeQ[{a, b, c, j, m, n, p}, x] &&  !IntegerQ[p] && NeQ[
n, j] && ILtQ[Simplify[(m + n*p + n - j + 1)/(n - j)], 0] && NeQ[m + j*p + 1, 0] && (IntegersQ[j, n] || GtQ[c,
 0])

Rubi steps \begin{align*} \text {integral}& = \frac {2 \sqrt {a x^2+b x^3}}{3 b}-\frac {(2 a) \int \frac {x}{\sqrt {a x^2+b x^3}} \, dx}{3 b} \\ & = \frac {2 \sqrt {a x^2+b x^3}}{3 b}-\frac {4 a \sqrt {a x^2+b x^3}}{3 b^2 x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.61 \[ \int \frac {x^2}{\sqrt {a x^2+b x^3}} \, dx=\frac {2 (-2 a+b x) \sqrt {x^2 (a+b x)}}{3 b^2 x} \]

[In]

Integrate[x^2/Sqrt[a*x^2 + b*x^3],x]

[Out]

(2*(-2*a + b*x)*Sqrt[x^2*(a + b*x)])/(3*b^2*x)

Maple [A] (verified)

Time = 1.85 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.61

method result size
trager \(-\frac {2 \left (-b x +2 a \right ) \sqrt {b \,x^{3}+a \,x^{2}}}{3 b^{2} x}\) \(30\)
risch \(-\frac {2 x \left (b x +a \right ) \left (-b x +2 a \right )}{3 \sqrt {x^{2} \left (b x +a \right )}\, b^{2}}\) \(31\)
pseudoelliptic \(\frac {2 \sqrt {b x +a}\, \left (3 b^{2} x^{2}-4 a b x +8 a^{2}\right )}{15 b^{3}}\) \(32\)
gosper \(-\frac {2 \left (b x +a \right ) \left (-b x +2 a \right ) x}{3 b^{2} \sqrt {b \,x^{3}+a \,x^{2}}}\) \(33\)
default \(-\frac {2 \left (b x +a \right ) \left (-b x +2 a \right ) x}{3 b^{2} \sqrt {b \,x^{3}+a \,x^{2}}}\) \(33\)

[In]

int(x^2/(b*x^3+a*x^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2/3*(-b*x+2*a)/b^2/x*(b*x^3+a*x^2)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.57 \[ \int \frac {x^2}{\sqrt {a x^2+b x^3}} \, dx=\frac {2 \, \sqrt {b x^{3} + a x^{2}} {\left (b x - 2 \, a\right )}}{3 \, b^{2} x} \]

[In]

integrate(x^2/(b*x^3+a*x^2)^(1/2),x, algorithm="fricas")

[Out]

2/3*sqrt(b*x^3 + a*x^2)*(b*x - 2*a)/(b^2*x)

Sympy [F]

\[ \int \frac {x^2}{\sqrt {a x^2+b x^3}} \, dx=\int \frac {x^{2}}{\sqrt {x^{2} \left (a + b x\right )}}\, dx \]

[In]

integrate(x**2/(b*x**3+a*x**2)**(1/2),x)

[Out]

Integral(x**2/sqrt(x**2*(a + b*x)), x)

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.61 \[ \int \frac {x^2}{\sqrt {a x^2+b x^3}} \, dx=\frac {2 \, {\left (b^{2} x^{2} - a b x - 2 \, a^{2}\right )}}{3 \, \sqrt {b x + a} b^{2}} \]

[In]

integrate(x^2/(b*x^3+a*x^2)^(1/2),x, algorithm="maxima")

[Out]

2/3*(b^2*x^2 - a*b*x - 2*a^2)/(sqrt(b*x + a)*b^2)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.78 \[ \int \frac {x^2}{\sqrt {a x^2+b x^3}} \, dx=\frac {4 \, a^{\frac {3}{2}} \mathrm {sgn}\left (x\right )}{3 \, b^{2}} + \frac {2 \, {\left ({\left (b x + a\right )}^{\frac {3}{2}} - 3 \, \sqrt {b x + a} a\right )}}{3 \, b^{2} \mathrm {sgn}\left (x\right )} \]

[In]

integrate(x^2/(b*x^3+a*x^2)^(1/2),x, algorithm="giac")

[Out]

4/3*a^(3/2)*sgn(x)/b^2 + 2/3*((b*x + a)^(3/2) - 3*sqrt(b*x + a)*a)/(b^2*sgn(x))

Mupad [B] (verification not implemented)

Time = 8.87 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.63 \[ \int \frac {x^2}{\sqrt {a x^2+b x^3}} \, dx=-\frac {\left (\frac {4\,a}{3\,b^2}-\frac {2\,x}{3\,b}\right )\,\sqrt {b\,x^3+a\,x^2}}{x} \]

[In]

int(x^2/(a*x^2 + b*x^3)^(1/2),x)

[Out]

-(((4*a)/(3*b^2) - (2*x)/(3*b))*(a*x^2 + b*x^3)^(1/2))/x